Skip to content

feat(rokt): add setSession/getSession with optional sessionToken - #760

Open
jaissica12 wants to merge 4 commits into
mainfrom
feature/rokt-session-token-handoff
Open

feat(rokt): add setSession/getSession with optional sessionToken#760
jaissica12 wants to merge 4 commits into
mainfrom
feature/rokt-session-token-handoff

Conversation

@jaissica12

Copy link
Copy Markdown

Background

  • Expose RoktSession handoff (id + optional JWT) for native ↔ WebView continuity, matching Web launcherOptions. Kit seeds Rokt.setSession when a token is present and falls back to setSessionId for id-only.

What Has Changed

  • {Describe the changes introduced by this PR}

Screenshots/Video

  • {Include any screenshots or video demonstrating the new feature or fix, if applicable}

Checklist

  • I have performed a self-review of my own code.
  • I have made corresponding changes to the documentation.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have tested this locally.

Additional Notes

  • {Any additional information or context relevant to this PR}

Reference Issue (For employees only. Ignore if you are an outside contributor)

Expose RoktSession handoff (id + optional JWT) for native ↔ WebView
continuity, matching Web launcherOptions. Kit seeds Rokt.setSession when
a token is present and falls back to setSessionId for id-only.
@jaissica12
jaissica12 marked this pull request as ready for review August 19, 2026 15:10
@jaissica12
jaissica12 requested a review from a team as a code owner August 19, 2026 15:10
@cursor

cursor Bot commented Aug 19, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Touches session identity and optional Bearer JWT handoff used to authorize offers/events, plus a Rokt SDK major-minor bump. Behavior is additive and id-only paths remain.

Overview
Adds native ↔ WebView session handoff via a new RoktSession (id, optional JWT, optional expiry), matching Web launcher options.

Public setSession / getSession on the Rokt facade seed Bearer continuity when a token is present and fall back to id-only setSessionId otherwise. Empty ids are ignored. Existing setSessionId / getSessionId are deprecated.

Bumps roktsdk and payment-extension to 6.1.0 so the native Rokt.setSession / getSession APIs are available.

Reviewed by Cursor Bugbot for commit 03fd5b6. Bugbot is set up for automated code reviews on this repo. Configure here.

Keep setSession/getSession with diagnostics logging and adopt roktsdk 6.1.0.
),
)
} else {
Rokt.setSessionId(sessionId)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need this?
The new SDK won't be using this anyway.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've only deprecated it for now but I could see removing if you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants